#define _CRT_SECURE_NO_WARNINGS
#include<stdlib.h>
#include<stdio.h>
int main()
{
	int (*arr)[3] = (int(*)[5])malloc(sizeof(int) * 3 * 5);
	int i = 0;
	int j = 0;
	if (arr == NULL)
	{
		return 1;
	}
	else
	{
		int count = 1;
		for (i = 0; i < 3; i++)
		{
			for (j = 0; j < 5; j++)
			{
				arr[i][j] = count++;
				printf("%d ", arr[i][j]);
			}
			printf("\n");
		}
	}
	return 0;
}